package com.iot.rule.mvc.feign.controller;

import javax.validation.Valid;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.iot.common.core.domain.mqtt.Payload;
import com.iot.common.core.exception.ModelException;
import com.iot.common.core.util.R;

import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;

@RestController
@RequiredArgsConstructor
@RequestMapping("/handle")
@Api(value = " RuleFeignController", tags = "产品方法")
public class RuleFeignController {
	@PostMapping
	public R<Payload> handle(@Valid @RequestBody Payload payload) {
		if (payload == null) {
			throw new ModelException("日志对象不可以为空！");
		}
		return R.failed();
	}
}
